package com.qunar.train.mock.qmq;

public class MockMessageConsumer implements qunar.tc.qmq.MessageConsumer {

    public static String VERSION = "1.0.0";


    public static ThreadLocal<MockMessageConsumer> threadLocal = new ThreadLocal<>();

    public static MockMessageConsumer getInstance() {
        if (threadLocal.get() == null) {
            threadLocal.set(new MockMessageConsumer());
        }
        return threadLocal.get();
    }

    private qunar.tc.qmq.ListenerHolder addListenerReturnValuePStringStringMessagelistenerThreadpoolexecutorRejectpolicy = null;
    private qunar.tc.qmq.ListenerHolder addListenerReturnValue = null;


    public qunar.tc.qmq.ListenerHolder addListener(String arg0, String arg1, qunar.tc.qmq.MessageListener arg2, java.util.concurrent.ThreadPoolExecutor arg3, qunar.tc.qmq.RejectPolicy arg4) {
        return getInstance().addListenerReturnValuePStringStringMessagelistenerThreadpoolexecutorRejectpolicy;
    }

    public qunar.tc.qmq.ListenerHolder addListener(String arg0, String arg1, qunar.tc.qmq.MessageListener arg2, java.util.concurrent.ThreadPoolExecutor arg3) {
        return getInstance().addListenerReturnValue;
    }


    public static void setAddListenerReturnValuePStringStringMessagelistenerThreadpoolexecutorRejectpolicy(qunar.tc.qmq.ListenerHolder p) {
        getInstance().addListenerReturnValuePStringStringMessagelistenerThreadpoolexecutorRejectpolicy = p;
    }

    public static void setAddListenerReturnValue(qunar.tc.qmq.ListenerHolder p) {
        getInstance().addListenerReturnValue = p;
    }

    public static void clear() {
        getInstance().addListenerReturnValuePStringStringMessagelistenerThreadpoolexecutorRejectpolicy = null;
        getInstance().addListenerReturnValue = null;
    }
}

